<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ page contentType="application/msexcel;charset=GBK" %>
<%
        response.setHeader("Content-disposition","inline; filename=ExportXls.xls");
       //以上这行设定传送到前端浏览器时的档名为test1.xls
       //就是靠这一行，让前端浏览器以为接收到一个excel档 
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
String table_data=(String)request.getAttribute("table_data");
%>

<html>
        <head>
               <title>Excel档案呈现方式</title>
        </head>
       	<%=table_data%>
</html>
